#include <stdio.h>
#include <stdlib.h>

#define N 6

int array[N];
int sequenceno = 0;
int ncount = 0;
int SF = 0;
//为0 表示结束
int endtest(int a[N])
{
    int i = 0;
    int flag = 0;

    for(i = 0; i < N; i++)
    {
        if(a[i] != 0)
        {
            flag = 1;
            break;
        }
    }

    return flag;
}

void getinput()
{
    int i = 0;

    for(i = 0; i < N; i++)
    {
        scanf("%d", &array[i]);
    }
}

int getcount(int low, int high)
{
    int i = 0;
    int n = 0;
    for(i = low; i <= high; i++)
        n += array[i] * (i + 1);
    return n;
}

void showarray()
{
    int i = 0;
    for(i = 0; i < N; i++)
    {
        printf("%d\t", array[i]);
    }
    printf("count: %d\r\n", ncount);
}

void showresult(int curn, int sum)
{
    int i = 0;
    for(i = 0; i < N; i++)
    {
        printf("%d\t", array[i]);
    }
    printf("curn: %d count: %d\r\n", curn, sum);
}

void opt()
{
    int i = 0;

    for(i = 1; i <= N; i++)
    {
        array[i-1] %= 30;
    }
}


void fn(int n, int sum)
{
    int i = 0;
    int left = getcount(n, N-1);
    if(left < sum)
        return;
    //showresult(n, sum);



    if(sum == 0 || SF == 1)
    {
        SF = 1;
        return;
    }
    else if(sum < 0)
    {
        return;
    }
    else
    {
        while(array[n] == 0)
            n++;
        if(n >= N)
            return;
        for(i = 0; i <= array[n]; i++)
        {
            array[n] -= i;
            sum -= i * (n+1);
            if(sum >= 0)
                fn(n+1, sum);
            array[n] += i;
            sum += i * (n+1);
        }
    }

}

void process()
{
    SF = 0;
    opt();
    ncount = getcount(0, N-1);

    if(ncount % 2 != 0)
    {
        SF = 0;
    }
    else
    {
        fn(0, ncount / 2);
    }

    if(SF == 0)
    {
        printf("Collection #%d:\r\nCan't be divided.\r\n\r\n", sequenceno);
    }
    else
    {
        printf("Collection #%d:\r\nCan be divided.\r\n\r\n", sequenceno);
    }
}

int main()
{
    //freopen("bin\\debug\\in.txt", "r", stdin);
    //freopen("bin\\debug\\out.txt", "w", stdout);

    getinput(array);
    while(endtest(array) != 0)
    {
        sequenceno++;
        ncount = getcount(0, N-1);
        process();
        getinput();
    }

    return 0;
}
